﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KiDS_Projekat
{
	/// <summary>
	/// Klasa koja predstavlja obradu CMD_PING zahteva i odgovara sa CMD_PONG
	/// </summary>
	public class PingPongCommand : Command
	{
		private readonly string _code;
		private readonly string _message;

		public PingPongCommand(SOCKET socket, string code, string message)
			: base(socket)
		{
			_code = code;
			_message = message;
		}

		public override void DoCommmand()
		{
			Native.SendMessage(_code + " " + _message, _socket);
			Native.closesocket(_socket);
			/*Client client = new Client(Properties.Settings.Default.BootstrapLocation, Properties.Settings.Default.BootstrapPort);
			client.Open();
			client.SendMessage("900 POKE FROM MARIJA!");
			client.Close();
			 */
		}
	}
}
